package org.jupiter.blog.web.application;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

/**
 * 博客系统启动类
 * 功能： - 启动 Spring Boot 应用 - 扫描 MyBatis Mapper 接口 - 扫描组件（Controller、Service 等）
 * 日志系统基于 SLF4J + Logback
 *
 * @author lwl
 * @since 2024/07/27
 */
@SpringBootApplication
@MapperScan("org.jupiter.blog.service.mapper")
@ComponentScan(basePackages = "org.jupiter.blog")
public class JupiterBlogApplication {

	private static final Logger log = LoggerFactory.getLogger(JupiterBlogApplication.class);

	public static void main(String[] args) {
		// 启动 Spring Boot 应用
		SpringApplication.run(JupiterBlogApplication.class, args);

		// 启动日志
		log.info("🚀 Jupiter 博客系统启动成功！");
	}
}
